home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / CRS / crs52.d81 / vdc-bg.sfx / testbgasm.cvt (.txt) < prev    next >
GEOS ConVerT  |  1990-02-12  |  3KB  |  98 lines

  1. <#testBGasm
  2. PRG formatted GEOS file V1.0
  3. Star NX-10
  4. OP V2.0 or higher
  5. Text  Scrap
  6. BLASTER'S CONVERTER V2.5
  7. testBGasm.rel
  8. VDC-BG.rel
  9. Write Image V2.1
  10. geoWrite    V2.1
  11. ; ****************************************************************************
  12. ;    testBG -- test the VDC-BG routines that implement an 80 column BG screen
  13. ;        within the extra RAM available on a 64K VDC RAM system.
  14. ;    Robert A. Knop Jr., Usenet Hacking Mag Issue #3
  15. ; ****************************************************************************
  16. ;.if    Pass1
  17. ;.noeqin
  18.      @.include    geosSym
  19. .include    128sym
  20. .include    geosMac
  21. ;.eqin
  22. ;.endif
  23. Start:
  24.     jsr    InitVDC    ;Make sure we're set up for 64K VDC
  25.     LoadW    RecoverVector,VDCRecRect ;Point to our new Recover Routine
  26.     LoadB    dispBufferOn,ST_WR_FORE ;Write only to FG screen
  27.     LoadW    r0,$2000
  28.     LoadW    r1,BACK_SCR_BASE
  29.     LoadB    r2L,$c7
  30.     jsr    FillRam    ;Fill the 40-col BG screen with $c7
  31.     LoadW    r0,$2000    ;Later, use the debugger, or write a short
  32.     LoadW    r1,SCREEN_BASE    ; routine to make sure this memory is untouched
  33.     LoadB    r2L,$d9    ;Fill the 40-col FG screen with $d9
  34.     jsr    FillRam
  35.     lda    #$00
  36.     jsr    SetPattern    ;Set pattern to all 0's
  37.     jsr     i_Rectangle    ;Clear the screen
  38.     .byte    0,199
  39.     .word    0,639
  40.     lda    #$01
  41.     jsr    SetPattern    ;Set pattern to all 1's
  42.     jsr    i_Rectangle    ;And draw a block
  43.     .byte    50,150
  44.     .word    80,255
  45.     LoadW    r3,0
  46.     LoadW    r4,639
  47.     LoadB    r2L,0
  48.     LoadB    r2H,199
  49.     jsr    VDCImpRect    ;Imprint whole screen to BG
  50.     lda    #$00
  51.     jsr    SetPattern
  52.     jsr    i_Rectangle    ;clear a subset of rectangle
  53.     .byte    80,120
  54.     .word    120,180
  55.     jsr    Wait
  56.     LoadW    r3,121
  57.     LoadW    r4,179
  58.     LoadB    r2L,81
  59.     LoadB    r2H,119
  60.     jsr    VDCRecRect    ;Recover all but a thin (1 pix) border
  61.     jsr    Wait
  62.     LoadW    r3,120
  63.     LoadW    r4,180
  64.     LoadB    r2L,80
  65.     LoadB    r2H,120
  66.     jsr    VDCRecRect    ;Recover whole cleared region
  67.     jsr    Wait
  68.     LoadW    r0,JunkBox
  69.     jsr    DoDlgBox    ;Call a dialog box to show that the
  70.     jsr    Wait    ; recovery after that works.
  71.      @jmp    EnterDeskTop
  72. eskTop
  73. JunkBox:    .byte    DEF_DB_POS|2
  74.     .byte    DBTXTSTR
  75.     .byte    TXT_LN_X,TXT_LN_1_Y
  76.     .word    LookMa
  77.     .byte    OK
  78.     .byte    DBI_X_1,DBI_Y_2
  79.     .byte    NULL
  80. LookMa:    .byte    "Look, Ma, a dialog box!",0
  81. Wait:    jsr    i_PutString
  82.     .word    0
  83.     .byte    190
  84.     .byte    "Click to continue.....",0
  85. 10$    lda    $dc01    ;Read mouse directly
  86.     and    #%00010000    ;Check the firebutton
  87.     bne    10$
  88.     lda    #$00
  89.     jsr    SetPattern
  90.     jsr    i_Rectangle
  91.     .byte    180,199
  92.     .word    0,639
  93.      @rts
  94. ;.eqin
  95. ;.endif
  96. Start:
  97.     jsr    InitVDC    ;Make sure we're s
  98.